package com.mk.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mk.entity.Pet;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;

@Mapper
public interface PetMapper extends BaseMapper<Pet> {

    @Options(useGeneratedKeys = true, keyProperty = "id")
    @Insert("insert into pet (name, age, breed, number_plate, born_time, create_time, update_time, score_time)" +
            "values (#{name}, #{age}, #{breed}, #{numberPlate}, #{bornTime}, #{createTime}, #{updateTime}, #{scoreTime})")
    void save(Pet pet);
}
